home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Comm / AmiTCP30b2.lha / src / amitcp / kern / variables.src < prev   
C/C++ Source or Header  |  1994-03-28  |  12KB  |  292 lines

  1. # $Id: variables.src,v 3.1 1994/02/03 19:05:02 ppessi Exp puhuri $
  2. #
  3. # variables.src --- Configuration and query variables
  4. #
  5. # Author: Pekka Pessi <Pekka.Pessi@hut.fi>
  6. #
  7. # Copyright (c) 1993 Pekka Pessi
  8. #                    All rights reserved
  9. #
  10. # Created      : Wed Apr 28 19:47:10 1993 ppessi
  11. # Last modified: Thu Feb  3 03:00:56 1994 ppessi
  12. #
  13. # $Log: variables.src,v $
  14. # Revision 3.1  1994/02/03  19:05:02  ppessi
  15. # Initial version 3 revision.
  16. #
  17. # Revision 1.17  1994/02/03  04:03:16  ppessi
  18. # Updated mbuf configration structure declarations; cleaned up history
  19. #
  20. # Revision 1.16  1994/01/18  02:31:21  jraja
  21. # Added new variable (HOSTNAME).
  22. #
  23. # Revision 1.15  1994/01/18  02:25:05  jraja
  24. # Changes for the new manual format (puhuri).
  25. #
  26. # Revision 1.14  1993/11/06  23:51:22  ppessi
  27. # Added ROUTES pseudoarray (returns routing table).
  28. #
  29. # Code for AmiTCP
  30. # FS="[\t ]*;[\t ]*", comment = ^#
  31. # $1= [alias=...]variable
  32. # $2= level of variable
  33. # $3= description of variable
  34. WITH ;    1 ;    Include a file with multiple settings. (This pseudo variable is a extension to the @code{SET} command.)
  35. /* read_sets() is declared in amiga_config.h */
  36. { VAR_FUNC, VF_RW, NULL, NULL, (notify_f)read_sets }
  37. # ICMP
  38. #
  39. IC=ICMP ;    1 ;    Variables related to Internet Message Control Protocol.
  40. extern LONG icmpstat;
  41. { VAR_LONG, VF_TABLE|VF_READ, KW_ICMP, &icmpstat, NULL }
  42. E=ERROR ;    2 ;    Number of calls to icmp_error().
  43. S=SHORTOLD ;    2 ;    No error because old IP was too short.
  44. I=ICMPOLD ;    2 ;    No error because old was ICMP.
  45. CO=CODE ;    2 ;    ICMP code out of range.
  46. T=TOOSHORT ;    2 ;    Packet too short.
  47. CH=CHKSUM ;    2 ;    Checksum error.
  48. L=LENGTH ;    2 ;    Data length larger than packet.
  49. R=RESPONSES ;    2 ;    Number of responses.
  50. #
  51. # ICMP HISTORY
  52. #
  53. ICH=ICMPHIST;    1 ;    ICMP packet send and reception history. For details on the output format, see @ref{ICMPHIST output}.
  54. extern LONG read_icmphist(struct CSource *args, UBYTE **errstrp, struct CSource *res);
  55. { VAR_FUNC, VF_READ, NULL, (notify_f)read_icmphist, NULL }
  56. #
  57. # IP
  58. #
  59. IP ;    1 ;    Variables related to Internet Protocol.
  60. extern LONG ipstat;
  61. { VAR_LONG, VF_TABLE|VF_READ, KW_IP,   &ipstat,   NULL }
  62. T=TOTAL ;    2 ;    Total number of packets.
  63. CH=CHKSUM ;    2 ;    Checksum error.
  64. TOOSH=TOOSHORT ;2 ;    Packet too short.
  65. TOOSM=TOOSMALL ;2 ;    Not enough data.
  66. H=HEADER ;    2 ;    IP header length less than data size.
  67. LE=LENGTH ;    2 ;    IP header length larger than packet.
  68. FS=FRAGMENTS ;    2 ;    Packet fragments received.
  69. FD=FDROP ;    2 ;    Fragments dropped (duplicates, out of space).
  70. FT=FTIMEOUT ;    2 ;    Fragments timed out.
  71. FO=FORWARD ;    2 ;    Packets forwarded.
  72. FW=FWDCANT ;    2 ;    Packets received for unreachable destination.
  73. RED=REDIRECTSENT ;2 ;    Packets forwarded on same net.
  74. N=NOPROTO ;    2 ;    Unknown or unsupported protocol.
  75. D=DELIVER ;    2 ;    Packets consumed here.
  76. LO=LOCALOUT ;    2 ;    Total IP packets generated here.
  77. OD=ODROPPED ;    2 ;    Lost packets due to nobufs, etc.
  78. REA=REASSEMBLED ;2 ;    Total packets reassembled ok.
  79. FE=FED ;    2 ;    Output packets fragmented ok.
  80. OF=OFRAGMENTS ;    2 ;    Output fragments created.
  81. FC=FCANT ;    2 ;    Don't fragment flag was set, etc.
  82. #
  83. # TCP
  84. #
  85. T=TCP ;    1 ;    Variables related to Transmission Control Protocol.
  86. extern LONG tcpstat;
  87. { VAR_LONG, VF_TABLE|VF_READ, KW_TCP,  &tcpstat,  NULL }
  88. CA=CATTEM ;    2 ;    Connections initiated.
  89. A=ACCEPTS ;    2 ;    Connections accepted.
  90. CO=CONNECT ;    2 ;    Connections established.
  91. DR=DROPS ;    2 ;    Connections dropped.
  92. CD=CDROPS ;    2 ;    Embryonic connections dropped.
  93. CL=CLOSED ;    2 ;    Connections closed (incl. drops).
  94. SE=SEGSTIMED ;    2 ;    Segments where we tried to get rtt.
  95. RTT=RTTUPDATE ;    2 ;    Times we succeed rtt.
  96. DE=DELACK ;    2 ;    Delayed acknowledgments sent.
  97. T=TIMEODROP ;    2 ;    Connection dropped in rxmt timeout.
  98. RE=REXMTT ;    2 ;    Retransmit timeouts.
  99. P=PERSIST ;    2 ;    Persist timeouts.
  100. KAT=KATIMEO ;    2 ;    Keepalive timeouts.
  101. KAP=KAPROBE ;    2 ;    Keepalive probes sent.
  102. KAD=KADROPS ;    2 ;    Connections dropped in keepalive.
  103. ST=STOTAL ;    2 ;    Total packets sent.
  104. SP=SPACK ;    2 ;    Data packets sent.
  105. SB=SBYTE ;    2 ;    Data bytes sent.
  106. SREP=SREPACK ;    2 ;    Data packets retransmitted.
  107. SREB=SREBYTE ;    2 ;    Data bytes retransmitted.
  108. SA=SACKS ;    2 ;    Ack-only packets sent.
  109. SWP=SWPROBE ;    2 ;    Window probes sent.
  110. SU=SURGENT ;    2 ;    Packets sent with URG only.
  111. SWU=SWUPDATE ;    2 ;    Window update-only packets sent.
  112. SC=SCTRL ;    2 ;    Control @code{(SYN|FIN|RST)} packets sent.
  113. RTO=RTOTAL ;    2 ;    Total packets received.
  114. RPA=RPACK ;    2 ;    Packets received in sequence.
  115. RB=RBYTE ;    2 ;    Bytes received in sequence.
  116. RC=RCHKSUM ;    2 ;    Packets received with checksum errors.
  117. ROF=ROFFSET ;    2 ;    Packets received with bad offset.
  118. RPS=RPSHORT ;    2 ;    Packets received too short.
  119. RDUPP=RDUPPACK ;2 ;    Duplicate-only packets received.
  120. RDUPB=RDUPBYTE ;2 ;    Duplicate-only bytes received.
  121. RPDUPD=RPDUPDATA ;2 ;    Packets with some duplicate data.
  122. RPDUPB=RPDUPBYTE ;2 ;    Dup. bytes in part-dup. packets.
  123. ROOP=ROOPACK ;    2 ;    Out-of-order packets received.
  124. ROOB=ROOBYTE ;    2 ;    Out-of-order bytes received.
  125. RPL=RPLATE ;    2 ;    Packets with data after window.
  126. RBL=RBLATE ;    2 ;    Bytes received after window.
  127. RAF=RAFTER ;    2 ;    Packets received after close.
  128. RWP=RWPROBE ;    2 ;    Received window probe packets.
  129. RDUPA=RDUPACK ;    2 ;    Received duplicate acknowledgments.
  130. RACKT=RACKTOOM ;2 ;    Received acknowledgments for unsent data.
  131. RACKP=RACKPACK ;2 ;    Received acknowledgment packets.
  132. RACKB=RACKBYTE ;2 ;    Bytes acknowledged by received acknowledgments.
  133. RWU=RWUPDATE ;    2 ;    Received window update packets.
  134. #
  135. # UDP
  136. #
  137. U=UDP ;    1 ;    Variables related to User Datagram Protocol.
  138. extern LONG udpstat;
  139. { VAR_LONG, VF_TABLE|VF_READ, KW_UDP,  &udpstat,  NULL }
  140. I=ITOTAL ;    2 ;    Total input packets.
  141. H=HEADSHORT ;    2 ;    Packet shorter than header.
  142. C=CHKSUM ;    2 ;    Checksum error.
  143. L=LENGTH ;    2 ;    Data length larger than packet.
  144. N=NOPORT ;    2 ;    No socket on port.
  145. B=BCNOPORT ;    2 ;    No socket on port, arrived as broadcast.
  146. F=FULLSOC ;    2 ;    Not delivered, input socket full.
  147. M=MISPCB ;    2 ;    Input packets missing pcb cache.
  148. O=OTOTAL ;    2 ;    Total output packets.
  149. #
  150. # Connection table
  151. #
  152. CONNECTIONS;    1 ;    Returns a list of all TCP and UDP connections, including server (listening) sockets. For the output format description, see @ref{CONNECTIONS output}.
  153. LONG getsockets(struct CSource *args, UBYTE **errstrp, struct CSource *res);
  154. { VAR_FUNC, VF_READ, NULL, (notify_f)getsockets, NULL }
  155. #
  156. # Host Name
  157. #
  158. HOSTNAME ;        1 ;     The name of the host returned by the gethostname() function.
  159. LONG rexx_gethostname(struct CSource *args, UBYTE **errstrp, struct CSource *res); LONG rexx_sethostname(struct CSource *args, UBYTE **errstrp, struct CSource *res);
  160. { VAR_FUNC, VF_RW, NULL, (notify_f)rexx_gethostname, (notify_f)rexx_sethostname }
  161. #
  162. # Routing table
  163. #
  164. ROUTES ;        1 ;     Returns a list of routing entries for specified protocol family. For the output format description, see @ref{Routing Format}.
  165. LONG getroutes(struct CSource *args, UBYTE **errstrp, struct CSource *res);
  166. { VAR_FUNC, VF_READ, NULL, (notify_f)getroutes, NULL }
  167. #
  168. # These are in the numeric order as in <sys/socket.h>.
  169. # Do not change the order!
  170. #
  171. global STRPTR KW_Protocols = KW_ROUTES;
  172. ALL        ; 2 ;    Unspecified
  173. UNIX        ; 2 ;    Local to host (pipes, portals)
  174. INET        ; 2 ;    Internetwork: UDP, TCP, etc.
  175. IMPLINK        ; 2 ;    Arpanet IMP Addresses
  176. PUP        ; 2 ;    PUP Protocols: e.g. BSP
  177. CHAOS        ; 2 ;    mit CHAOS protocols
  178. NS        ; 2 ;    XEROX NS protocols
  179. ISO        ; 2 ;    ISO protocols
  180. ECMA        ; 2 ;    European Computer Manufacturers
  181. DATAKIT        ; 2 ;    Datakit Protocols
  182. CCITT        ; 2 ;    CCITT protocols, X.25 etc
  183. SNA        ; 2 ;    IBM SNA
  184. DECnet        ; 2 ;    DECnet
  185. DLI        ; 2 ;    DEC Direct Data Link Interface
  186. LAT        ; 2 ;    LAT
  187. HYLINK        ; 2 ;    NSC Hyperchannel
  188. APPLETALK    ; 2 ;    Apple Talk
  189. ROUTE        ; 2 ;    Internal Routing Protocol
  190. LINK        ; 2 ;    Link layer interface
  191. XTP        ; 2 ;    eXpress Transfer Protocol
  192. #
  193. # MBUF
  194. #
  195. MBS=MBUF_STAT ;    1 ;    Memory buffer statistics.
  196. extern struct mbstat mbstat;
  197. { VAR_LONG, VF_TABLE|VF_READ, KW_MBUF_STAT, &mbstat, NULL }
  198. M=MBUFS ;    2 ;    Total number of allocated memory buffers.
  199. CL=CLUSTERS ;    2 ;    Total number of allocated memory buffer clusters.
  200. CLF=CLFREE ;    2 ;    Number of memory buffer clusters free.
  201. MD=MDROPS ;    2 ;    Times failed to find space.
  202. NW=NWAITED ;    2 ;    Times waited for space.
  203. ND=NDRAINED ;    2 ;    Times drained protocols for space.
  204. TMU=TOTALMEMORYUSED ;2;    Total amount of memory used for the mbufs.
  205. #
  206. # MBUF type specific statistics
  207. #
  208. MBTS=MBUF_TYPE_STATS;    1 ;    Returns type specific statistics of mbuf allocations. The last number is the total number of mbufs allocated.
  209. extern LONG mb_read_stats(struct CSource *args, UBYTE **errstrp, struct CSource *res);
  210. { VAR_FUNC, VF_READ, NULL, (notify_f)mb_read_stats, NULL }
  211. #
  212. # MBUF Configuration
  213. #
  214. MBC=MBUF_CONF ;    1 ;    Memory buffer configuration.
  215. extern struct mbconf mbconf; int mb_check_conf(void *pt, LONG new);
  216. { VAR_LONG, VF_TABLE|VF_RCONF,   KW_MBUF_CONF, &mbconf, mb_check_conf }
  217. I=INITIAL ;    2 ;    Number of mbuf chunks to allocate initially.
  218. CH=CHUNK ;    2 ;    Number of mbufs to allocate at a time.
  219. CL=CLCHUNK ;    2 ;    Number of clusters to allocate at a time.
  220. MM=MAXMEM ;    2 ;    Maximum memory to use (in kilobytes).
  221. CS=CLUSTERSIZE ;2 ;    Size of an mbuf cluster.
  222. #
  223. # LOG configuration
  224. #
  225. LOG ;    1 ;    Logging system configuration.
  226. extern LONG log_cnf;
  227. { VAR_LONG, VF_TABLE|VF_RCONF,   KW_LOG, &log_cnf, NULL }
  228. COUNT ;    2 ;    Number of log messages to use.
  229. LEN ;    2 ;    Maximum length of a log message.
  230. #
  231. # Single variables
  232. #
  233. # This is an example of the VAR_INET type variable
  234. #
  235. #NS=NS1=NSPRIM ;    1 ;    Address of the primary nameserver.
  236. #struct sockaddr_in ns_1 = { sizeof(ns_1), AF_INET };
  237. #{ VAR_INET, VF_RW, NULL, &ns_1.sin_addr, NULL }
  238. #
  239. TASKNAME ;    1 ;    Name of @AMITCP task.
  240. extern STRPTR taskname; int taskname_changed(void *pt, LONG new);
  241. { VAR_STRP, VF_RCONF, NULL, &taskname, taskname_changed }
  242. #
  243. NTH=NTHBASE ;    1 ;    Current @AMITCP has nth @LIB base currently in memory.
  244. extern LONG nthLibrary;
  245. { VAR_LONG, VF_RW, NULL, &nthLibrary,  NULL }
  246. #
  247. DBSANA=DEBUGSANA ;    1 ;    Boolean to switch the SANA-II device interface debugging on and off@footnote{For description about boolean variable, see @ref{Boolean Variables}.}.
  248. extern LONG debug_sana;
  249. { VAR_ENUM, VF_RW, NULL, &debug_sana, boolean_enum }
  250. #
  251. DBICMP=DEBUGICMP ;    1 ;    Boolean to switch the ICMP debugging on and off.
  252. extern LONG icmpprintfs;
  253. { VAR_ENUM, VF_RW, NULL, &icmpprintfs, boolean_enum }
  254. #
  255. DBIP=DEBUGIP ;    1 ;    Boolean telling whether IP should log debugging information.
  256. extern LONG ipprintfs;
  257. { VAR_ENUM, VF_RW, NULL, &ipprintfs, boolean_enum }
  258. #
  259. GTW=GATEWAY ;    1 ;    Boolean to switch gateway functionality on and off.
  260. extern LONG ipforwarding;
  261. { VAR_ENUM, VF_RW, NULL, &ipforwarding, boolean_enum }
  262. #
  263. REDIR=IPSENDREDIRECTS ;    1 ;    Boolean telling whether IP should send ICMP redirect messages.
  264. extern LONG ipsendredirects;
  265. { VAR_ENUM, VF_RW, NULL, &ipsendredirects, boolean_enum }
  266. #
  267. USENS=USENAMESERVER ;    1 ;    How to use name server. Possible values are:\n@table @code\n@item NO\nDo not use name server at all. Local database will be used instead.\n@item FIRST\nQuery the name servers first and if that fails, use local database.\n@item SECOND\nFirst look up the local database, then, if that fails, query the name servers.\n@end table
  268. extern LONG usens;
  269. { VAR_ENUM, VF_RW, NULL, &usens, (notify_f)"NO,FIRST,SECOND" }
  270. #
  271. ULO=USELOOPBACK ;    1 ;    If true use the local loop device for local traffic.
  272. extern LONG useloopback;
  273. { VAR_ENUM, VF_RW, NULL, &useloopback, boolean_enum }
  274. #
  275. TCPSND=TCP_SENDSPACE ;    1 ;    Default size of the sending socket buffer (TCP).
  276. extern ULONG tcp_sendspace;
  277. { VAR_LONG, VF_RW, NULL, (LONG*)&tcp_sendspace, NULL }
  278. #
  279. TCPRCV=TCP_RECVSPACE ;    1 ;    Default size of the receiving socket buffer (TCP).
  280. extern ULONG tcp_recvspace;
  281. { VAR_LONG, VF_RW, NULL, (LONG*)&tcp_recvspace, NULL }
  282. #
  283. CON=CONSOLENAME ;    1 ;    Filename for the log console.
  284. extern STRPTR consolename ;     int logname_changed(void *pt, LONG new);
  285. { VAR_STRP, VF_RW, NULL, &consolename, logname_changed }
  286. #
  287. LOGF=LOGFILENAME ;    1 ;    Filename for the log file.
  288. extern STRPTR logfilename;
  289. { VAR_STRP, VF_RW, NULL, &logfilename, logname_changed }
  290.